#include <iostream>
#define SIZE 100

using namespace std;

double ma, numbers[SIZE];
int n;

int main()
{
	int i, p;
	cout << "n = ";
	cin >> n;
	
	for (i = 1, p = 0; i <= n; ++i, p += 2)
	{	
		cout << "number: ";
		cin >> numbers[p];
		numbers[p - 1] = (numbers[p - 2] + numbers[p]) / 2;
	}
	for (i = 0; i < p - 1; ++i)
		cout << numbers[i] << endl;
	
}